<template>
  <div class="wrap header">
    <div class="left">
      <img src="../assets/img/indexLogo.6f8ac4f0.png" alt="" />
    </div>
    <ul class="center">
      <li
        :class="{ first: $route.path === '/home' }"
        @click="$router.push('/home')"
      >
        首页
      </li>
      <li
        :class="{ first: $route.path === '/goods' }"
        @click="$router.push('/goods')"
      >
        全部商品
      </li>
      <li
        :class="{ first: $route.path === '/user' }"
        @click="$router.push('/user')"
      >
        个人中心
      </li>
      <li
        :class="{ first: $route.path === '/order' }"
        @click="$router.push('/order')"
      >
        我的订单
      </li>
      <li
        :class="{ first: $route.path === '/free' }"
        @click="$router.push('/free')"
      >
        专属福利
      </li>
    </ul>
    <div class="right">
      <input type="text" placeholder="搜索全部商品直接回车" />
      <span class="sou">
        <img src="../assets/img/search.png" alt="" />
      </span>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="less" scoped>
.header {
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .center {
    display: flex;
    color: #4e5372;
    li {
      padding: 0 25px;
      cursor: pointer;
    }
    .first {
      font-weight: bold;
      color: #0a329d;
    }
  }

  .right {
    input {
      width: 200px;
      height: 36px;
      border: 2px solid #dedede;
      border-right: 0;
      border-radius: 20px 0px 0px 20px;
      outline: none;
      padding: 0 15px;
    }

    .sou {
      display: inline-block;
      width: 50px;
      height: 40px;
      background: #0a328e;
      border-radius: 0px 20px 20px 0px;
      line-height: 39px;
      text-align: center;
      vertical-align: middle;
      cursor: pointer;
    }
  }
}
</style>